home *** CD-ROM | disk | FTP | other *** search
/ IRIX Development Foundation for IRIX 6.4 / SGI IRIX 6.4 Development Foundation.iso / docs6.4 / relnotes / compiler_dev / ch4.z / ch4
Text File  |  1997-09-11  |  20KB  |  528 lines

  1.  
  2.  
  3.  
  4.                                                - 1 -
  5.  
  6.  
  7.  
  8.                     Base Development 7.2 Release Notes
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.                                                - 2 -
  69.  
  70.  
  71.  
  72.                     DDDDooooccccuuuummmmeeeennnntttt NNNNuuuummmmbbbbeeeerrrr 000000008888----1111777788882222----000033330000
  73.  
  74.  
  75.                     4.  _K_n_o_w_n__P_r_o_b_l_e_m_s__a_n_d__W_o_r_k_a_r_o_u_n_d_s
  76.  
  77.  
  78.  
  79.                     4.0.1  _M_I_P_S_p_r_o__C_o_m_p_i_l_e_r_s
  80.  
  81.                      +o The MIPSpro C compiler requires adherence to
  82.                        the ANSI C requirement (3.3.2.2) which states
  83.                        that calls to varargs routines must have a
  84.                        prototype visible at the call and the
  85.                        function definition (if they pass floating
  86.                        point actual arguments), and must use the
  87.                        _s_t_d_a_r_g._h (ANSI C section 4.8) interface.  The
  88.                        compiler will issue a warning if it sees
  89.                        floating point parameters passed to _p_r_i_n_t_f,
  90.                        _s_p_r_i_n_t_f, or _f_p_r_i_n_t_f without a prototype.  _l_d
  91.                        will issue a warning if possible when
  92.                        floating point parameters are passed to
  93.                        varargs routines without prototypes visible
  94.                        at the call site.  However, _l_d cannot issue
  95.                        such warnings if the call is via a function
  96.                        pointer to an anonymous function.
  97.  
  98.                        SGI-provided library functions like _p_r_i_n_t_f
  99.                        all use prototype-style declarations in the
  100.                        system header files (i.e. <stdio.h>), so
  101.                        simply including the relevant header files in
  102.                        files which call them satisfies this
  103.                        requirement. User-written code should use the
  104.                        same practice.
  105.  
  106.                      +o The 64-bit subprogram call interface passes
  107.                        all parameters in 64-bit containers.  The
  108.                        first eight are passed in registers, sign-
  109.                        extending integers smaller than 64 bits to
  110.                        64-bits.  Beyond the first eight, parameters
  111.                        smaller than 64-bits (except structs) are
  112.                        passed right justified in the 64-bit
  113.                        container in memory.  Therefore, passing an
  114.                        int (32-bit) parameter and referencing it in
  115.                        the callee as a long or pointer (64-bit) may
  116.                        pick up extraneous garbage in the high-order
  117.                        half of the value.  Use of prototypes will
  118.                        solve this problem by automatically
  119.                        converting the passed value; otherwise, the
  120.                        normal C rules for correspondence between
  121.                        actual and formal parameters must be
  122.                        followed.  An important potential cause of
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.                                                - 3 -
  135.  
  136.  
  137.  
  138.                        this problem is defining "_N_U_L_L" as "0" and
  139.                        then passing it as an unprototyped pointer
  140.                        parameter.  To avoid this, define "_N_U_L_L" as
  141.                        "0L" or "(void *)0".
  142.  
  143.                      +o There are a number of similar issues which
  144.                        arise in porting C code to the 64-bit
  145.                        programming model.  See the _M_I_P_S_p_r_o _6_4-_b_i_t
  146.                        _P_o_r_t_i_n_g _a_n_d _T_r_a_n_s_i_t_i_o_n _G_u_i_d_e for more
  147.                        information.
  148.  
  149.                      +o The software pipelining statistics that are
  150.                        generated when compilations are performed
  151.                        with the -_O_3 -_S -_r_5_0_0_0 flags are overly
  152.                        conservative in calculating peak performance
  153.                        of the R5000. As a result, software
  154.                        pipelining reports such as the one below can
  155.                        indicate values over 100% of peak performance
  156.                        for this processor. For example:
  157.  
  158.                         #<swps>   100 estimated iterations before pipelining
  159.                         #<swps>       Not unrolled before pipelining
  160.                         #<swps>    32 cycles per iteration
  161.                         #<swps>    64 flops        (196% of peak) (madds count as 2)
  162.                         #<swps>    32 flops        (100% of peak) (madds count as 1)
  163.                         #<swps>    32 madds        (193% of peak)
  164.                         #<swps>    32 fmuls        (193% of peak) (madds count as 1)
  165.                         #<swps>    32 fadds        (100% of peak) (madds count as 1)
  166.                         #<swps>    16 mem refs     ( 50% of peak)
  167.                         #<swps>    31 integer ops  ( 96% of peak) (mem refs included)
  168.                         #<swps>    63 instructions ( 98% of peak)
  169.                         #<swps>     2 short trip threshold
  170.                         #<swps>    21 ireg registers used.
  171.                         #<swps>    24 fgr registers used.
  172.  
  173.                      +o A new flag has been provided for the -_O_P_T:
  174.                        ... group.  -_O_P_T:_w_r_a_p__a_r_o_u_n_d__u_n_s_a_f_e__o_p_t=_O_F_F
  175.                        will disable both the induction variable
  176.                        replacement and linear function test
  177.                        replacement optimizations.  These
  178.                        optimizations are normally enabled at general
  179.                        optimization level -_O_3.  The optimizations
  180.                        are unsafe in that they may potentially
  181.                        generate incorrect code for situations that
  182.                        may arise (but are not limited to) when there
  183.                        are multiple induction variables in loops and
  184.                        their combined initial values can overflow or
  185.                        wrap around. General use of this flag is
  186.                        discouraged because it can degrade
  187.                        performance. It is provided, however, as a
  188.                        diagnostic tool to identify the situation
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.                                                - 4 -
  201.  
  202.  
  203.  
  204.                        described above.
  205.  
  206.                      +o The assembly language file created by -_n_3_2
  207.                        -_m_i_p_s_4 -_i_p_a -_k_e_e_p is under certain
  208.                        circumstances incompatible with the
  209.                        assembler.
  210.  
  211.                     4.0.2  _l_d
  212.  
  213.  
  214.                      +o The ld option -default_delay_load can
  215.                        occasionally cause problems.  In certain
  216.                        cases, when an application (MAIN) references
  217.                        a dso (libONE.so) which contains a function
  218.                        which references a global variable (FOO)
  219.                        defined in another dso (libTWO.so) which has
  220.                        been built with -default_delay_load, the
  221.                        application may show the following error:
  222.  
  223.                            1374:MAIN :rld: Fatal Error: unresolvable symbol in libONE.so: FOO
  224.  
  225.                        In such cases, ld is supposed to override the
  226.                        delay_load marking for libTWO.so and mark it
  227.                        as immediate load.  However, sometimes it
  228.                        fails to do this.  The workaround is build
  229.                        libTWO.so without using -default_delay_load.
  230.                        (Bug #494294)
  231.  
  232.  
  233.                      +o ld options  -delay_load and
  234.                        -default_delay_load can slow down run-time
  235.                        performance of certain applications.  This is
  236.                        because rld will try to re-resolve undefined
  237.                        symbols in the main executable and all
  238.                        currently loaded dsos. (Bug #506076)
  239.  
  240.  
  241.                      +o Some programs linked with libpthread.so may
  242.                        be slow to quickstart.  (and therefor with
  243.                        anything after it on the liblist).  In some
  244.                        cases libpthread.so was not created linked
  245.                        with the applicable most up-to-date libc.so.1
  246.                        so the libc/libpthread conflict list is not
  247.                        complete.  In such cases rqsall/rqs will
  248.                        refuse to requickstart libpthread.so. (Bug
  249.                        #507098)
  250.  
  251.  
  252.                      +o Sometimes rld gets DSO visibility wrong and
  253.                        calls to dlopen will result in  an error
  254.                        saying dlopen can't resolve a symbol defined
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.                                                - 5 -
  267.  
  268.  
  269.  
  270.                        in one DSO (FOO) and then referenced in DSO
  271.                        (BAR).  This occurs when parts of DSO FOO are
  272.                        marked as hidden with respect to some DSO's,
  273.                        even if a particular symbol in FOO should be
  274.                        visible to BAR.  The workaround in to re-
  275.                        order the loading of DSO's so that FOO is
  276.                        loaded after BAR. (Bug #455035)
  277.  
  278.  
  279.                      +o ld sometimes complains when -_u_p_d_a_t_e__r_e_g_i_s_t_r_y
  280.                        or -_e_x_p_o_r_t_s are used on the link line  (Bug
  281.                        #375616).
  282.  
  283.                        The error messages that are being generated
  284.                        in certain cases when these flags are used
  285.                        are:
  286.  
  287.                        ld: ERROR 4: Conflicting flag setting: --update_registry
  288.                        ld: ERROR 4: Conflicting flag setting: -exports
  289.  
  290.                     4.1  _d_b_x
  291.  
  292.                      +o _d_b_x cannot correctly display data values of
  293.                        C++ class members that have a C++ class
  294.                        offset (offset in bytes from the beginning of
  295.                        the class) greater than 32767.  This bug does
  296.                        not apply to C structures or unions or
  297.                        Fortran records:  it applies only to C++
  298.                        classes.  The symptom is that the data values
  299.                        displayed (for data that has a class offset
  300.                        greater than 32767 bytes) are incorrect.
  301.  
  302.                      +o _l_d(1) options like -Bsymbolic and -hides and
  303.                        -hidden_symbol cause ELF markings to be made
  304.                        to cause _r_l_d(1) to resolve symbol references
  305.                        differently than by default.  These markings
  306.                        are not noticed by _d_b_x. _d_b_x always resolves
  307.                        externals starting with the present dso (the
  308.                        current frame and scope) working outwards to
  309.                        the external scope of that dso/a.out and then
  310.                        proceeds sequentially thru the DSOs to find
  311.                        the external.  _d_b_x can therefore print an
  312.                        incorrect value given an external name when
  313.                        there are multiple externals with the same
  314.                        name and the resolution rule _d_b_x follows at
  315.                        present does not match the rules rld uses.
  316.                        Use the wwwwhhhhiiiicccchhhh command to see what symbol an
  317.                        external name resolves to.  Use specific _d_b_x
  318.                        naming using the dso module name to resolve a
  319.                        name to a specific dso.  For example, to
  320.                        print a value errno from libc.so.1 (bypassing
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.                                                - 6 -
  333.  
  334.  
  335.  
  336.                        the incomplete lookup rules), use the _d_b_x
  337.                        command print libc.errno.
  338.  
  339.                      +o If _RLD_ROOT is set to pick up a different
  340.                        _l_i_b_c._s_o._1, and breakpoints are set in
  341.                        _l_i_b_c._s_o._1 before running the program, the
  342.                        breakpoints become permanent, that is they
  343.                        cannot be deleted. A workaround is to stop in
  344.                        main before setting any breakpoints in
  345.                        libc.so.1.
  346.  
  347.                      +o In single-user state, if _d_b_x core dumps on
  348.                        startup, try the command sequence
  349.  
  350.  
  351.                          /etc/init.d/network start
  352.                          /etc/init.d/network stop
  353.  
  354.  
  355.                        _T_h_e_n _r_e_t_r_y _d_b_x.  Usually the message before
  356.                        the abort will start with EEEERRRRRRRROOOORRRR:::: bbbbiiiinnnndddd ffffaaaaiiiilllleeeedddd
  357.                        eeeerrrrrrrrnnnnoooo 111122226666.
  358.  
  359.                      +o If a store instruction updates a location
  360.                        which is being tracked with a stop/when/trace
  361.                        and the cpu is an R8000 and the store
  362.                        instruction is in any delay slot (jump or
  363.                        load) and the program is a 32-bit program,
  364.                        the stop/when/trace may not be triggered and
  365.                        if it is triggered may print out/use an
  366.                        incorrect value.
  367.  
  368.                      +o On an R8000:  if an interactive function call
  369.                        calls a function which has anything but a
  370.                        no-op (aka 'nada') in the delay slot of a
  371.                        return from that function (jr ra) _d_b_x  will
  372.                        print <Unimplemented> and cannot print the
  373.                        function's return value.  The function has
  374.                        been executed and any side effects happened.
  375.                        Clear the incomplete 'return' with the
  376.                        cccclllleeeeaaaarrrrccccaaaallllllllssss command or the rrrreeeettttuuuurrrrnnnn command.
  377.  
  378.                      +o It is difficult to set a breakpoint in some
  379.                        relatively new kinds of C++ functions (for
  380.                        example X::operator int and X::operator
  381.                        new[]) The only ways are to determine the
  382.                        full demangled name and enclose it in back-
  383.                        quotes or to determine the full mangled name
  384.                        and use that.  Long accepted forms, such as
  385.                        X::operator + can be named to dbx as X::+.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.                                                - 7 -
  399.  
  400.  
  401.  
  402.                      +o If you move a corefile and its a.out to
  403.                        another machine, _d_b_x will probably warn about
  404.                        mismatches with certain DSOs when you try to
  405.                        use _d_b_x on the a.out and corefile.  You
  406.                        cannot safely copy the DSOs from the other
  407.                        machine into the corresponding locations of
  408.                        the new machine (i.e., /usr/lib) and if you
  409.                        copy them somewhere else (for example if you
  410.                        copy them into the same directory as the core
  411.                        file and a.out) there is no way to tell _d_b_x
  412.                        where to find them (_d_b_x does not understand
  413.                        that the information in the corefile about
  414.                        the dso absolute paths should be
  415.                        disregarded).
  416.  
  417.                      +o If the list of DSOs (and their respective
  418.                        library list as shown by eeeellllffffdddduuuummmmpppp ----DDDDllll) has a
  419.                        circularity _d_b_x will keep reading the
  420.                        circular set over and over forever, never
  421.                        finishing.  Such a circularity is improper
  422.                        and ill-advised and should be removed by
  423.                        changing your DSO build (the circularity will
  424.                        be in your DSOs). While _d_b_x ought to catch
  425.                        and warn about this, it does not in this
  426.                        release (except for some simple circularities
  427.                        where a dso names itself: it does catch some
  428.                        very simple cases but does not issue a
  429.                        warning).
  430.  
  431.                      +o If you set two watchpoints at the same
  432.                        address, _d_b_x will correctly output an error
  433.                        message when you try and set the second
  434.                        watchpoint. However, if you delete the first
  435.                        watchpoint, the second watchpoint will appear
  436.                        even though it does not show up in any
  437.                        status.
  438.  
  439.  
  440.                     4.1.1  _L_i_b_r_a_r_i_e_s  These are known problems in
  441.                     compiler-associated libraries:
  442.  
  443.                        +o In general, routines in the ----llllmmmm44443333 library
  444.                          might not conform to either SVR4 or IEEE
  445.                          with respect to diagnostics or return
  446.                          values.  These discrepancies are, however,
  447.                          described in the manual pages of the
  448.                          constituent functions. (See Section 3.5 for
  449.                          math library changes).  The following
  450.                          particular problems are known (these
  451.                          problems exist in ----llllmmmm44443333 routines, but not
  452.                          in ----llllmmmm routines):
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.                                                - 8 -
  465.  
  466.  
  467.  
  468.                             - The ----llllmmmm44443333 _y_0, _y_1, and _y_n functions
  469.                               produce underflow inconsistently (with
  470.                               respect to ----llllmmmm).
  471.  
  472.                        +o The results from _v_s_i_n, _v_c_o_s and _v_t_a_n are
  473.                          valid only for argument values between
  474.                          (pi*2e19) and (pi*2e-19).
  475.  
  476.                        +o The results from _v_s_i_n_f, _v_c_o_s_f and _v_t_a_n_f are
  477.                          valid only for argument values between 2e28
  478.                          and 2e-28.
  479.  
  480.                        +o The results from _v_s_q_r_t_f and _v_s_q_r_t are not
  481.                          always correctly rounded.
  482.  
  483.                        +o The mips4 versions of the following
  484.                          routines do not support denormal arguments:
  485.                          _v_l_o_g_f, _v_l_o_g_1_0_f, _v_l_o_g_1_0, _v_l_o_g.
  486.                          All return NaN under those circumstances.
  487.  
  488.                        +o Because the multiply-add instructions are
  489.                          rounded twice on the R10000, the Fortran
  490.                          intrinsics _A_M_O_D and _D_M_O_D are less accurate
  491.                          than than they are on earlier chips.
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.